/*
 * @Descripttion:
 * @Author: voanit
 * @Date: 2022-05-15 14:37:52
 * @LastEditors: voanit
 * @LastEditTime: 2022-05-19 08:36:14
 */
// import
import request from '@/utils/request'
import { CHANNELS } from '@/store/actionTypes'
export const actionChannels = async (dispatch) => {
  // 异步
  const res = await request.get('/channels')
  // console.log(res, 88)
  dispatch({ type: CHANNELS, payload: res.data.channels }) // 将token存到store中
}
